<h3><?php echo $title; ?></h3>
<script>
	function order_area() {
  var n = $("input:checked").val();
  alert(n);
 // $("div").text(n + (n <= 1 ? " is" : " are") + " checked!");
}
//order_area();
//$(":checkbox").click(order_area);

$(document).ready(function() {
$('input:checkbox').click(function () {
var n =$('input:checked').val();
if (n !== undefined && n == 'cart' ) {
//HideColumn('Status',false);

//$("#area").slideDown(400);

} else {
//$("#area").slideUp(300);
//HideColumn('Status',true);
}
});
$('#selectall').click(function()
{
	$('input:checkbox').attr('checked',true);
//	$("#area").slideDown(400);
});

$('#removeall').click(function()
{
	$('input:checkbox').attr('checked',false);
//	$("#area").slideUp(300);
}
);
}); 
</script>


<?php echo form_open_multipart('admin/permission/create/'); ?>

<div class="control2">

<?php

	echo form_submit('create', 'Save');

	echo form_submit('close', 'Close');

?>

</div><!--control2 end-->


<div class="box_ex">

<?php 

  echo '<p class="error"></p>';

   
   if(isset($missing) && is_array($missing) )
   {
  
   echo "<div class='error' style='text-align:center'>";
   foreach($missing as $item)
   {
   		echo $item."<br />";
   }
   echo "</div>";
   }
  
  //================THÔNG TIN XÁC THỰC================

  echo '<p class="title">'.$this->lang->line('title_user_info').'</p>';



  


  //Email

/*	echo '<div class="inner">';

  $code = 'email';
  $label = "Email";
	if (! empty($missing) && array_key_exists('email', $missing))

		echo form_label($label, '', array('class'=>'error width-185'));

	else
			echo form_label($label, '', array('class'=>'width-185'));
//  $label = $field['private'][$code].'*';

	//if (! empty($missing) && array_key_exists($code, $missing))

	//	echo form_label($label, '', array('class'=>'error width-185'));

//	else

		

	//echo form_input($code, set_value($code));
	$site= base_url()."index.php/";
//	echo "<input type='text' name='".$code."' onkeypress='Javascript:check_email(this.value,\"$site\");' value='" .set_value($code) ."'/>";
 echo form_input($code, set_value($code));
//	echo "<span id='kq' style='width:150px;'> asd</span>";

	echo '</div>';
*/
	// username

	echo '<div class="inner">';

  $code = 'name';

  $label ='Chức danh';

 if (! empty($missing) && array_key_exists($code, $missing))

		echo form_label($label, '', array('class'=>'error width-185'));

	else

		echo form_label($label, '', array('class'=>'width-185'));

  echo form_input($code, set_value($code));

	echo '</div>';

	echo '<div class="inner" id="area" >';

  $code = 'area';

  $label ='Thuộc siêu thị';

 if (! empty($missing) && array_key_exists($code, $missing))

		echo form_label($label, '', array('class'=>'error width-185'));

	else

		echo form_label($label, '', array('class'=>'width-185'));

  //echo form_input($code, set_value($code));
	?>
    <select name="area"  > 
    <option value="-1"> ---- Chọn khu vực  ---- </option>
    <option value="0"> Tất cả </option>
    	<option value="1"> An Phú </option>
        <option value="2"> Phú Mỹ </option>
        <option value="3"> Hưng Gia </option>
    </select>
    
    
    <?php


	echo '</div>';


  //Password ?>

<!-- <div style="vertical-align:text-top;padding-left:76px;"> -->
<?php
/*	$label="Quyền truy cập";
	$style = array("style"=>"vertical-align:top");
	if (! empty($missing) && array_key_exists($code, $missing))

		echo form_label($label, '', array('class'=>'error'));

	else

		echo form_label($label,"",$style);
*/
?>
<!--
<select id="component[]" name="component[]" validate="required:true, maxlength:2" style="width:150px;margin-left:0px;" multiple="multiple">
		<?php 
		/*	foreach($comp as $item)
			{
				$name = unserialize($item['cpnt_name']);
				//$info = unserialize($item['cpnt_info']);
				echo '<option value="'.$item['cpnt_id'].'">'.$name['vi'].'</option>';
			}
			
		*/
		
		 ?>
        	   	<option value="user" >Thành Viên</option>
            <option value="news">Tin tức</option>
             <option value="cart">Giỏ hàng</option>
              <option value="product">Product</option>
               <option value="cate">ngành hàng - nhóm hàng</option>
                <option value="permission">Quyền hạn</option>
		</select>
</div> -->
<div  >
<?php 
/*$label="Quyền truy cập";
	$style = array("style"=>"vertical-align:top;float:left;width:100px;");
	if (! empty($missing) && array_key_exists($code, $missing))

		echo form_label($label, '', array('class'=>'error'));

	else

		echo form_label($label,"",$style);
*/
?>
<fieldset  style="text-align:left;width:500px"> <legend style="text-align:left;"> Chọn Quyền truy cập</legend> 
<table width="450"  style=""> 
<?php 

//echo '';
		echo '<a href="#" id="selectall" style="color:#99;text-decoration:none" >Chọn tất cả</a> | <a href="#" id="removeall" style="color:#999;text-decoration:none" >Bỏ chọn</a>';
	//	echo "<table > ";
		echo "<tr>";
		echo "<td>";
		echo form_checkbox('component[]', "cart");
		echo " Đơn đặt hàng";
		echo "</td>";
		echo "<td>";
		echo form_checkbox('component[]', "permission");
		echo " Quyền hạn";
		echo "</td>";
		echo "<td>";
		echo form_checkbox('component[]', "user"); 
		echo " Thành viên";
		echo "</td>";
		
		echo "</tr>";
		echo "<tr>";
		echo "<td>";
		echo form_checkbox('component[]', "news");
		echo " Tin tức";
		echo "</td>";
		echo "<td>";
		echo form_checkbox('component[]', "product");
		echo " Sản phẩm"; 
		echo "</td>";
		echo "<td>";
		echo form_checkbox('component[]', "cate");
		echo " Ngành hàng - Nhóm hàng";
		echo "</td>";
		echo "</tr>";
		echo "</table>";
		
echo '</fieldset>';
echo '</div>';
	






 //================THÔNG TIN CÁ NHÂN================

 //  echo '<p class="title">THÔNG TIN CÁ NHÂN</p>';

 





  //Tên

	echo '<div class="inner">';
	echo "<p>&nbsp;</p>";
 
	echo '</div>';



?>

</div><!--end box-->



<?php

	echo form_close(); //FORM END

?>


